shell脚本 | 您所在的位置:网站首页 › 统计不同列 同名人数 › shell脚本 |
#!/bin/bash #遍历目录函数 list_alldir(){ for road in `ls -a $1` do if [ x"$road" != x"." -a x"$road" != x".." ];then if [ -d "$1/$road" ];then echo "$1/$road" list_alldir "$1/$road" do if [ x"$road" != x"." -a x"$road" != x".." ];then if [ -d "$1/$road" ];then echo "$1/$road" list_alldir "$1/$road" fi fi done } echo "输入文件A的根目录:" read path_A list_alldir $path_A >Adir.txt echo "输入文件B的根目录:" read path_B list_alldir $path_B >Bdir.txt for fileA in $(find $path |
CopyRight 2018-2019 实验室设备网 版权所有 |